/*! \file Buffer.h
 *	\brief <write description for Buffer.h>
 *
 *	created:	2010/12/12
 *	created:	12:12:2010   20:28
 *	filename: 	C:\src\tactics-engine\libs\gd\Buffer.h
 *	file path:	C:\src\tactics-engine\libs\gd
 *	file base:	Buffer
 *	file ext:	h
 *	author:		Vitalii Trubchaninov
 *				venngraydog@gmail.com
 */

#ifndef _gd_BUFFER_H_
#define _gd_BUFFER_H_

#pragma once

#include "BufferImpl.h"

namespace tt{
namespace gd{

class DeviceContex;

class Buffer
{
public:
	explicit Buffer(ScopedPtr<BufferImpl>&);
	virtual ~Buffer();

	void lock(DeviceContext*);
	void unlock(DeviceContext*);

 	UInt size() const;
 	void* data();

	void apply(DeviceContext*);

private:
	ScopedPtr<BufferImpl> m_impl;
};

} //namespace gd
} //namespace tt
#include "Buffer.inl"

#endif //_gd_BUFFER_H_